package common.concurrency.baeldung.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author zhang hao dong
 * @date 2025-06-06 11:04
 */
public class ThreadPoolDemo {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(5);
        for (int i = 0; i < 500; i++) {
            executorService.execute(()->{
                System.out.println("Thread name :"+Thread.currentThread().getName());
            });
        }
    }
}
